﻿@model IEnumerable<ECGadmin.Common.GoldenTimeProductTopListDto>
@{
    if (Model != null)
    {
        var count = 0;
        foreach (var item in Model)
        {
            count++;
    <tr>
        <td>@count</td>
        <td>@item.Barcode</td>
        <td style="text-align: left;">@item.Name</td>
        <td>
            @item.Price.ToString("##,###,###")
            <input type="hidden" name="hidPriceOld" value="@item.Price"/>
        </td>
        <td>@item.PromotionPercent%</td>
        <td>
            <input type="text" name="txtGoldenPromotion" value="@item.PromotionUnit" style="width: 21px; color: #3d6aa2;" maxlength="3" />
            %
        </td>
        <td>
            @{
                var price = "0";
                if(item.PriceUnit>0)
                {
                    price = item.PriceUnit.ToString("##,###,###");
                }
            }
            <input type="text" name="txtGoldenPrice" value="@price" style="width: 70px; color: red;" />
        </td>
        <td style="background: #f1f1f1;">
            <a href="#">20</a>
        </td>
        <td style="background: #f1f1f1;">
            <div class="plbtn">
                <img src="/Content/images/ajax-loader.gif" width="16" height="16" style="display: none;"/>
                <input type="button" value="Cập nhập" id="btnGoldenProductUpdate" style="cursor: pointer;" onclick="GoldenProductUpdate('@item.Id',this);" />
            </div>
            <div class="plbtn2">
                <a href="javascript:void(0);" onclick="DelGoldenTimeProduct('@item.ProductId','@item.CampaintId',this);">Xóa</a>
            </div>
            <div class="cl"></div>
        </td>
    </tr>
        }
    }
}
